package com.hejjon.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author: cs
 * @date: 2025-02-20 14:27:14
 * @since: 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("db_connection")
@ApiModel(value="DBConnection对象", description="数据库连接表")
public class DBConnection {

    @TableId("id")
    private String id;

    @TableField("name")
    private String name;

    @TableField("drive_type")
    private String driveType;

    @TableField("host")
    private String host;

    @TableField("port")
    private Long port;

    @TableField("url")
    private String url;

    @TableField("username")
    private String username;

    @TableField("password")
    private String password;


    @TableField("description")
    private String description;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField("create_by")
    private String createBy;

    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField("update_by")
    private String updateBy;

    /**
     * 是否删除(0未删除1已删除)
     */
    @TableField("delete_flag")
    private String deleteFlag;

}
